//
//  ViewController.m
//  工厂模式
//
//  Created by clz on 2019/10/7.
//  Copyright © 2019 clz. All rights reserved.
//

#import "ViewController.h"
#import "MyModel.h"

@interface ViewController ()

@property(nonatomic,strong)NSMutableArray *dataArray;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    NSArray *tempArray = @[
                       @{
                           @"type":@"1",
                           @"title":@"我是标题",
                           },
                       
                       @{
                           @"type":@"2",
                           @"subTitle":@"我是副标题",
                           }
                       ];
    
    self.dataArray = [[NSMutableArray alloc]init];
    
    for (NSDictionary *dic in tempArray) {
        MyModel *model = [MyModel initWithDictionary:dic];
        [self.dataArray addObject:model];
    }
}


@end
